package com.lunar.service.impl;

import com.lunar.entity.UserInfo;
import com.lunar.mapper.UserInfoMapper;
import com.lunar.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoServiceImpl implements UserInfoService {
    @Autowired
    UserInfoMapper userInfoMapper;
    @Override
    public List<UserInfo> getAllUser() {
        return userInfoMapper.selectList(null);
    }

    @Override
    public int login(String username,String password) {
        return userInfoMapper.login(username,password);
    }

    @Override
    public int register(UserInfo userInfo) {
        return userInfoMapper.insert(userInfo);
    }
}
